package com.taikang.pms.entity;

import com.google.common.base.Objects;
import com.taikang.base.entity.BaseBusLongEntity;
import java.lang.String;
import java.lang.Long;

import static com.google.common.base.Preconditions.checkNotNull;

public class Building extends BaseBusLongEntity {

    private String name;

    public String getName() {
        return name;
    }

    private Integer number;

    public Integer getNumber() {
        return number;
    }

    private Integer lift;

    public Integer getLift() {
        return lift;
    }

    private Integer totalCount;

    public Integer getTotalCount() {
        return totalCount;
    }

    private Long communityId;

    public Long getCommunityId() {
        return communityId;
    }

    private String remark;

    public String getRemark() {
        return remark;
    }

    private Integer sort;

    public Integer getSort() {
        return sort;
    }

    public static Builder aBuilding() {
        return new Builder();
    }

    public static class Builder {
        private String name;
        private Integer number;
        private Integer lift;
        private Integer totalCount;
        private Long communityId;
        private String remark;
        private Integer sort;

        public Builder withName(String name) {
            this.name = name;
            return this;
        }

        public Builder withNumber(Integer number) {
            this.number = number;
            return this;
        }

        public Builder withLift(Integer lift) {
            this.lift = lift;
            return this;
        }

        public Builder withTotalCount(Integer totalCount) {
            this.totalCount = totalCount;
            return this;
        }

        public Builder withCommunityId(Long communityId) {
            this.communityId = communityId;
            return this;
        }

        public Builder withRemark(String remark) {
            this.remark = remark;
            return this;
        }

        public Builder withSort(Integer sort) {
            this.sort = sort;
            return this;
        }

        public Building build() {
            Building building = new Building();
            building.name = checkNotNull(name);
            building.number = checkNotNull(number);
            building.lift = checkNotNull(lift);
            building.totalCount = checkNotNull(totalCount);
            building.communityId = checkNotNull(communityId);
            return building;
        }
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(name, super.getId());
    }

}